<?php
echo "tmp_".("001" + "10");
exit;

testNewImage();
//Imagick->compositeImage() text
function testCompositeImage(){
    $im1 = new Imagick("bgs/bg1.png");
    $im2 = new Imagick("bgs/bg2.png");
    echo "compositing....";
    $im2->compositeImage($im1, Imagick::COMPOSITE_DISSOLVE, 0, 0);
    echo "writing...\n";
    $im2->writeImage("compositeText.png");
    echo "end...\n";
}
//create image test
function testNewImage(){
    $newImage = new Imagick();
    $newImage->newImage($x = 200, $y = 200, new ImagickPixel("transparent"), "png");
    echo "creating....\n";
    $newImage->writeImage("newImageText.gif");
    echo "end writing..\n";
}
exit;
//composte test
$bg = "fgani.gif";
if(is_file($bg)){
    $first = new Imagick($bg);
    $second = new Imagick($bg);
    echo $second->getImageCompose();
    $first->compositeImage($second, $second->getImageCompose(), 10, 10);
    $first->writeImage("compoisted.png");
}else{
    echo "erro";
}
exit;
$anigif1 = "output/animation.gif";
if(is_file($anigif)){
    try{
        $im1 = new Imagick($anigif);
        $im2 = new Imagick($anigfi);
        $i = 0;
        foreach($im as $frame){
            print_r($frame);
            $frame->writeImage("output/animation_{$i}.gif");
            $i++;
        }
    }catch(ImagickException $e){
        echo "Error:".$e;
    }
}else{
    echo "file doesn't exist!";
}
?>
